home *** CD-ROM | disk | FTP | other *** search
- package Code.LIB
- {
- import Code.LIB.SOUND._bu111;
- import flash.display.Bitmap;
- import flash.events.Event;
- import flash.events.MouseEvent;
- import flash.filters.DropShadowFilter;
- import flash.geom.Rectangle;
-
- public class _ct751 extends _dk430
- {
- public static const stNoAction:int = 0;
-
- public static const stMoveDown:int = 1;
-
- public static const stMoveUp:int = 2;
-
- private var mount:Bitmap;
-
- private var id:String;
-
- private var label:_wy567;
-
- protected var hitSp:_be548;
-
- private var state:int;
-
- private var iWidth:Number;
-
- private var iHeight:Number;
-
- public function _ct751(param1:Bitmap, param2:_wy567, param3:Boolean = true, param4:Number = -1, param5:Number = -1, param6:String = "")
- {
- var _loc7_:_be548 = null;
- super();
- id = param6;
- this.iHeight = param5;
- this.iWidth = param4;
- if(param1)
- {
- this.mount = param1;
- this.addChild(mount);
- }
- _loc7_ = new _be548();
- _loc7_.graphics.beginFill(16711680,0);
- if(param5 > 0)
- {
- _loc7_.graphics.drawRect(0,0,param4 * _rs402._oy577,param5 * _rs402._oy577);
- }
- else
- {
- _loc7_.graphics.drawRect(0,0,this.mount.width,this.mount.height);
- }
- _loc7_.graphics.endFill();
- this.hitSp = _loc7_;
- if(param2)
- {
- this.label = param2;
- this._xs48 = this.label.iText.text;
- this.addChild(label);
- }
- this.addChild(_loc7_);
- hitArea = _loc7_;
- if(param3)
- {
- this.filters = [new DropShadowFilter(18 * _rs402._oy577,45,0,0.8,30 * _rs402._oy577,30 * _rs402._oy577,0.4 * _rs402._oy577)];
- }
- this.alpha = 1;
- this.buttonMode = true;
- }
-
- override public function _fl204(param1:MouseEvent) : void
- {
- if(param1.target == _en365)
- {
- this.State = stMoveDown;
- }
- }
-
- public function set _xs48(param1:String) : void
- {
- var _loc2_:Rectangle = null;
- var _loc3_:Rectangle = null;
- var _loc4_:Number = NaN;
- this.label.Text = param1;
- _loc2_ = this.label.iText.getCharBoundaries(0);
- _loc3_ = this.label.iText.getCharBoundaries(label.iText.text.length - 1);
- if(this.iWidth < 0)
- {
- this.label.x = (this.mount.width - _loc3_.right) / 2;
- this.label.y = (this.mount.height - _loc2_.height) / 2;
- }
- else
- {
- _loc4_ = iWidth * _rs402._oy577;
- this.label.x = (iWidth * _rs402._oy577 - label.width * _rs402._oy577) / 2 + 4;
- this.label.y = 0;
- this.label.x = (iWidth * _rs402._oy577 - _loc3_.right) / 2.2;
- this.label.y = (iHeight * _rs402._oy577 - _loc2_.height) / 2.2;
- }
- }
-
- public function get ID() : String
- {
- if(id == null)
- {
- return "i dont have ID";
- }
- return id.substr(0,id.length);
- }
-
- override public function _nu62(param1:MouseEvent) : void
- {
- super._ah123(param1);
- if(this.alpha > 0)
- {
- this.alpha = 1;
- }
- }
-
- override public function _ah123(param1:MouseEvent) : void
- {
- super._ah123(param1);
- if(this.alpha > 0.85)
- {
- this.alpha = 0.85;
- }
- }
-
- override public function onEnterFrame(param1:Event) : void
- {
- super.onEnterFrame(param1);
- switch(state)
- {
- case stNoAction:
- break;
- case stMoveDown:
- this.scaleX = this.scaleY = this.scaleY - 0.055;
- if(this.scaleY < 0.9)
- {
- this.State = stMoveUp;
- }
- break;
- case stMoveUp:
- this.scaleX = this.scaleY = this.scaleY + 0.025;
- if(this.scaleX >= 1)
- {
- this.State = stNoAction;
- }
- }
- }
-
- private function set State(param1:int) : void
- {
- this.state = param1;
- switch(state)
- {
- case stNoAction:
- this.scaleX = 1;
- this.scaleY = 1;
- break;
- case stMoveDown:
- _bu111._wu209("button");
- }
- }
-
- public function get _en365() : _be548
- {
- return this.hitSp;
- }
- }
- }
-
-